

# 今天成交量比昨天成交量放大了1倍，则买入1手

# 通达信： VOL/REF(VOL,1)>2

# 掘金python
# coding=utf-8
from __future__ import print_function, absolute_import
from gm.api import *

import datetime
import numpy as np
import pandas as pd
import multiprocessing
import statsmodels.api as sm
 
def init(context):
    subscribe(symbols=['SHSE.600519', 'SHSE.600419'], frequency='1d')
    
 
def on_bar(context, bars):
    print(context.symbols)

 
if __name__ == '__main__':
    run(strategy_id='859c3b0a-1765-11ec-acc4-d0509949eed8',
    filename='main.py',
    mode=MODE_BACKTEST,
    token='bf739ec28ad507f391a3c3e99ed0365007da88f8',
    backtest_start_time='2024-05-01 08:00:00',
    backtest_end_time='2024-06-20 15:00:00',
    backtest_adjust=ADJUST_PREV,
    backtest_initial_cash=10000000,
    backtest_commission_ratio=0.0001,
    backtest_slippage_ratio=0.0001)